<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy       #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns      #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE CPP               #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE DeriveFoldable    #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor     #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE DeriveTraversable #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE MagicHash         #-}</span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE UnboxedTuples     #-}</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Event.PSQ</span><span>
</span><span id="line-12"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-13"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Binding Type</span></span><span>
</span><span id="line-14"></span><span>      </span><span class="annot"><a href="GHC.Event.PSQ.html#Elem"><span class="hs-identifier">Elem</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-15"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier">Key</span></a></span><span>
</span><span id="line-16"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier">Prio</span></a></span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Priority Search Queue Type</span></span><span>
</span><span id="line-19"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#PSQ"><span class="hs-identifier">PSQ</span></a></span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Query</span></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#size"><span class="hs-identifier">size</span></a></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#null"><span class="hs-identifier">null</span></a></span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#lookup"><span class="hs-identifier">lookup</span></a></span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Construction</span></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#empty"><span class="hs-identifier">empty</span></a></span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#singleton"><span class="hs-identifier">singleton</span></a></span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Insertion</span></span><span>
</span><span id="line-31"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-identifier">unsafeInsertNew</span></a></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Delete/Update</span></span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#delete"><span class="hs-identifier">delete</span></a></span><span>
</span><span id="line-35"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#adjust"><span class="hs-identifier">adjust</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Conversion</span></span><span>
</span><span id="line-38"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#toList"><span class="hs-identifier">toList</span></a></span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Min</span></span><span>
</span><span id="line-41"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#findMin"><span class="hs-identifier">findMin</span></a></span><span>
</span><span id="line-42"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#deleteMin"><span class="hs-identifier">deleteMin</span></a></span><span>
</span><span id="line-43"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#minView"><span class="hs-identifier">minView</span></a></span><span>
</span><span id="line-44"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#atMost"><span class="hs-identifier">atMost</span></a></span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Nat"><span class="hs-identifier">Nat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#empty"><span class="hs-identifier">empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Event.Unique.html"><span class="hs-identifier">GHC.Event.Unique</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Word.html"><span class="hs-identifier">GHC.Word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier">Word64</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier">Num</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Real.html"><span class="hs-identifier">GHC.Real</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier">fromIntegral</span></a></span><span class="hs-special">)</span><span class="hs-cpp">

#include &quot;MachDeps.h&quot;
</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- TODO (SM): get rid of bang patterns</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-comment">{-
-- Use macros to define strictness of functions.
-- STRICT_x_OF_y denotes a y-ary function strict in the x-th parameter.
-- We do not use BangPatterns, because they are not in any standard and we
-- want the compilers to be compiled by as many compilers as possible.
#define STRICT_1_OF_2(fn) fn arg _ | arg `seq` False = undefined
-}</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- Types</span><span>
</span><span id="line-68"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-keyword">type</span><span> </span><span id="Prio"><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-var">Prio</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-keyword">type</span><span> </span><span id="Nat"><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-var">Nat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span class="hs-keyword">type</span><span> </span><span id="Key"><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-var">Key</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | We store masks as the index of the bit that determines the branching.</span><span>
</span><span id="line-77"></span><span class="hs-keyword">type</span><span> </span><span id="Mask"><span class="annot"><a href="GHC.Event.PSQ.html#Mask"><span class="hs-identifier hs-var">Mask</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="hs-keyword">type</span><span> </span><span id="PSQ"><span class="annot"><a href="GHC.Event.PSQ.html#PSQ"><span class="hs-identifier hs-var">PSQ</span></a></span></span><span> </span><span id="local-6989586621679551996"><span class="annot"><a href="#local-6989586621679551996"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551996"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span class="hs-comment">-- | @E k p@ binds the key @k@ with the priority @p@.</span><span>
</span><span id="line-82"></span><span class="hs-keyword">data</span><span> </span><span id="Elem"><span class="annot"><a href="GHC.Event.PSQ.html#Elem"><span class="hs-identifier hs-var">Elem</span></a></span></span><span> </span><span id="local-6989586621679552091"><span class="annot"><a href="#local-6989586621679552091"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="E"><span class="annot"><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span></span><span>
</span><span id="line-83"></span><span>    </span><span class="hs-special">{</span><span> </span><span id="key"><span class="annot"><span class="annottext">forall a. Elem a -&gt; Key
</span><a href="GHC.Event.PSQ.html#key"><span class="hs-identifier hs-var hs-var">key</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span>
</span><span id="line-84"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="prio"><span class="annot"><span class="annottext">forall a. Elem a -&gt; Prio
</span><a href="GHC.Event.PSQ.html#prio"><span class="hs-identifier hs-var hs-var">prio</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span>
</span><span id="line-85"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="value"><span class="annot"><span class="annottext">forall a. Elem a -&gt; a
</span><a href="GHC.Event.PSQ.html#value"><span class="hs-identifier hs-var hs-var">value</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679552091"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-86"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-comment">-- | A priority search queue with @Int@ keys and priorities of type @p@ and</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- values of type @v@. It is strict in keys, priorities and values.</span><span>
</span><span id="line-90"></span><span class="hs-keyword">data</span><span> </span><span id="IntPSQ"><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-var">IntPSQ</span></a></span></span><span> </span><span id="local-6989586621679552058"><span class="annot"><a href="#local-6989586621679552058"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-91"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="Bin"><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679552058"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Event.PSQ.html#Mask"><span class="hs-identifier hs-type">Mask</span></a></span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552058"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552058"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="Tip"><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-var">Tip</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679552058"><span class="hs-identifier hs-type">v</span></a></span><span>
</span><span id="line-93"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="Nil"><span class="annot"><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span></span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="hs-comment">-- bit twiddling</span><span>
</span><span id="line-96"></span><span class="hs-comment">----------------</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="annot"><a href="GHC.Event.PSQ.html#.%26."><span class="hs-operator hs-type">(.&amp;.)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span>
</span><span id="line-99"></span><span id=".%26."><span class="annot"><span class="annottext">.&amp;. :: Nat -&gt; Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#.%26."><span class="hs-operator hs-var hs-var">(.&amp;.)</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679551987"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551987"><span class="hs-identifier hs-var">w1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679551986"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551986"><span class="hs-identifier hs-var">w2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Nat
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551987"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551986"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">.&amp;.</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="annot"><a href="GHC.Event.PSQ.html#xor"><span class="hs-identifier hs-type">xor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span>
</span><span id="line-103"></span><span id="xor"><span class="annot"><span class="annottext">xor :: Nat -&gt; Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#xor"><span class="hs-identifier hs-var hs-var">xor</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679551984"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551984"><span class="hs-identifier hs-var">w1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679551983"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551983"><span class="hs-identifier hs-var">w2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Nat
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551984"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#xor%23"><span class="hs-operator hs-var">`xor#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551983"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#xor"><span class="hs-pragma hs-type">xor</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span class="annot"><a href="GHC.Event.PSQ.html#complement"><span class="hs-identifier hs-type">complement</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span>
</span><span id="line-107"></span><span id="complement"><span class="annot"><span class="annottext">complement :: Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#complement"><span class="hs-identifier hs-var hs-var">complement</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679551981"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551981"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Nat
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551981"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#xor%23"><span class="hs-operator hs-var">`xor#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551980"><span class="hs-identifier hs-var">mb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-keyword">where</span><span class="hs-cpp">
#if WORD_SIZE_IN_BITS == 32
</span><span>    </span><span class="hs-identifier">mb</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-number">0xFFFFFFFF##</span><span class="hs-cpp">
#elif WORD_SIZE_IN_BITS == 64
</span><span>    </span><span id="local-6989586621679551980"><span class="annot"><span class="annottext">mb :: Word#
</span><a href="#local-6989586621679551980"><span class="hs-identifier hs-var hs-var">mb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFFFFFFFFFFFFFFFF##</span></span><span class="hs-cpp">
#else
</span><span class="hs-cpp">#error Unhandled value for WORD_SIZE_IN_BITS
</span><span class="hs-cpp">#endif
</span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#complement"><span class="hs-pragma hs-type">complement</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-pragma hs-type">natFromInt</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-119"></span><span class="annot"><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-type">natFromInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span>
</span><span id="line-120"></span><span id="natFromInt"><span class="annot"><span class="annottext">natFromInt :: Int -&gt; Nat
</span><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-var hs-var">natFromInt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Nat
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#intFromNat"><span class="hs-pragma hs-type">intFromNat</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-123"></span><span class="annot"><a href="GHC.Event.PSQ.html#intFromNat"><span class="hs-identifier hs-type">intFromNat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-124"></span><span id="intFromNat"><span class="annot"><span class="annottext">intFromNat :: Nat -&gt; Int
</span><a href="GHC.Event.PSQ.html#intFromNat"><span class="hs-identifier hs-var hs-var">intFromNat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#zero"><span class="hs-pragma hs-type">zero</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.Event.PSQ.html#zero"><span class="hs-identifier hs-type">zero</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Mask"><span class="hs-identifier hs-type">Mask</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-128"></span><span id="zero"><span class="annot"><span class="annottext">zero :: Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#zero"><span class="hs-identifier hs-var hs-var">zero</span></a></span></span><span> </span><span id="local-6989586621679551976"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551976"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679551975"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551975"><span class="hs-identifier hs-var">m</span></a></span></span><span>
</span><span id="line-129"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Nat
</span><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-var">natFromInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Int
</span><a href="GHC.Event.Unique.html#asInt"><span class="hs-identifier hs-var hs-var">asInt</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551976"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Nat
</span><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-var">natFromInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551975"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Nat
</span><span class="hs-number">0</span></span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#nomatch"><span class="hs-pragma hs-type">nomatch</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-132"></span><span class="annot"><a href="GHC.Event.PSQ.html#nomatch"><span class="hs-identifier hs-type">nomatch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Mask"><span class="hs-identifier hs-type">Mask</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-133"></span><span id="nomatch"><span class="annot"><span class="annottext">nomatch :: Key -&gt; Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#nomatch"><span class="hs-identifier hs-var hs-var">nomatch</span></a></span></span><span> </span><span id="local-6989586621679551972"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551972"><span class="hs-identifier hs-var">k1</span></a></span></span><span> </span><span id="local-6989586621679551971"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551971"><span class="hs-identifier hs-var">k2</span></a></span></span><span> </span><span id="local-6989586621679551970"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551970"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-134"></span><span>    </span><span class="annot"><span class="annottext">Int -&gt; Nat
</span><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-var">natFromInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Int
</span><a href="GHC.Event.Unique.html#asInt"><span class="hs-identifier hs-var hs-var">asInt</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551972"><span class="hs-identifier hs-var">k1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Nat
</span><a href="#local-6989586621679551969"><span class="hs-identifier hs-var">m'</span></a></span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Nat
</span><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-var">natFromInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Int
</span><a href="GHC.Event.Unique.html#asInt"><span class="hs-identifier hs-var hs-var">asInt</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551971"><span class="hs-identifier hs-var">k2</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Nat
</span><a href="#local-6989586621679551969"><span class="hs-identifier hs-var">m'</span></a></span><span>
</span><span id="line-135"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-136"></span><span>    </span><span id="local-6989586621679551969"><span class="annot"><span class="annottext">m' :: Nat
</span><a href="#local-6989586621679551969"><span class="hs-identifier hs-var hs-var">m'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#maskW"><span class="hs-identifier hs-var">maskW</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Nat
</span><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-var">natFromInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551970"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#maskW"><span class="hs-pragma hs-type">maskW</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-139"></span><span class="annot"><a href="GHC.Event.PSQ.html#maskW"><span class="hs-identifier hs-type">maskW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span>
</span><span id="line-140"></span><span id="maskW"><span class="annot"><span class="annottext">maskW :: Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#maskW"><span class="hs-identifier hs-var hs-var">maskW</span></a></span></span><span> </span><span id="local-6989586621679551966"><span class="annot"><span class="annottext">Nat
</span><a href="#local-6989586621679551966"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#complement"><span class="hs-identifier hs-var">complement</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Nat
</span><a href="#local-6989586621679551966"><span class="hs-identifier hs-var">m</span></a></span><span class="annot"><span class="annottext">Nat -&gt; Nat -&gt; Nat
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Nat
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#xor"><span class="hs-operator hs-var">`xor`</span></a></span><span> </span><span class="annot"><span class="annottext">Nat
</span><a href="#local-6989586621679551966"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#branchMask"><span class="hs-pragma hs-type">branchMask</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-143"></span><span class="annot"><a href="GHC.Event.PSQ.html#branchMask"><span class="hs-identifier hs-type">branchMask</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Mask"><span class="hs-identifier hs-type">Mask</span></a></span><span>
</span><span id="line-144"></span><span id="branchMask"><span class="annot"><span class="annottext">branchMask :: Key -&gt; Key -&gt; Int
</span><a href="GHC.Event.PSQ.html#branchMask"><span class="hs-identifier hs-var hs-var">branchMask</span></a></span></span><span> </span><span id="local-6989586621679551964"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551964"><span class="hs-identifier hs-var">k1'</span></a></span></span><span> </span><span id="local-6989586621679551963"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551963"><span class="hs-identifier hs-var">k2'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-145"></span><span>    </span><span class="annot"><span class="annottext">Nat -&gt; Int
</span><a href="GHC.Event.PSQ.html#intFromNat"><span class="hs-identifier hs-var">intFromNat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#highestBitMask"><span class="hs-identifier hs-var">highestBitMask</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Nat
</span><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-var">natFromInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551961"><span class="hs-identifier hs-var">k1</span></a></span><span> </span><span class="annot"><span class="annottext">Nat -&gt; Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#xor"><span class="hs-operator hs-var">`xor`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Nat
</span><a href="GHC.Event.PSQ.html#natFromInt"><span class="hs-identifier hs-var">natFromInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551960"><span class="hs-identifier hs-var">k2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-146"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621679551961"><span class="annot"><span class="annottext">k1 :: Int
</span><a href="#local-6989586621679551961"><span class="hs-identifier hs-var hs-var">k1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Int
</span><a href="GHC.Event.Unique.html#asInt"><span class="hs-identifier hs-var hs-var">asInt</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551964"><span class="hs-identifier hs-var">k1'</span></a></span><span>
</span><span id="line-148"></span><span>    </span><span id="local-6989586621679551960"><span class="annot"><span class="annottext">k2 :: Int
</span><a href="#local-6989586621679551960"><span class="hs-identifier hs-var hs-var">k2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Int
</span><a href="GHC.Event.Unique.html#asInt"><span class="hs-identifier hs-var hs-var">asInt</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551963"><span class="hs-identifier hs-var">k2'</span></a></span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="annot"><a href="GHC.Event.PSQ.html#highestBitMask"><span class="hs-identifier hs-type">highestBitMask</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Nat"><span class="hs-identifier hs-type">Nat</span></a></span><span>
</span><span id="line-151"></span><span id="highestBitMask"><span class="annot"><span class="annottext">highestBitMask :: Nat -&gt; Nat
</span><a href="GHC.Event.PSQ.html#highestBitMask"><span class="hs-identifier hs-var hs-var">highestBitMask</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679551959"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679551959"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-152"></span><span>    </span><span class="annot"><span class="annottext">Word# -&gt; Nat
</span><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-var">W#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-identifier hs-var">uncheckedShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-identifier">WORD_SIZE_IN_BITS##</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">minusWord#</span><span class="hs-special">`</span><span> </span><span class="hs-number">1##</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">minusWord#</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">clz#</span><span> </span><span class="hs-identifier">x</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#highestBitMask"><span class="hs-pragma hs-type">highestBitMask</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-156"></span><span class="hs-comment">-- Query</span><span>
</span><span id="line-157"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="hs-comment">-- | /O(1)/ True if the queue is empty.</span><span>
</span><span id="line-160"></span><span id="local-6989586621679552080"><span class="annot"><a href="GHC.Event.PSQ.html#null"><span class="hs-identifier hs-type">null</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552080"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-161"></span><span id="null"><span class="annot"><span class="annottext">null :: forall v. IntPSQ v -&gt; Bool
</span><a href="GHC.Event.PSQ.html#null"><span class="hs-identifier hs-var hs-var">null</span></a></span></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-162"></span><span class="annot"><a href="GHC.Event.PSQ.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-163"></span><span>
</span><span id="line-164"></span><span class="hs-comment">-- | /O(n)/ The number of elements stored in the queue.</span><span>
</span><span id="line-165"></span><span id="local-6989586621679552077"><span class="annot"><a href="GHC.Event.PSQ.html#size"><span class="hs-identifier hs-type">size</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552077"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span></span><span>
</span><span id="line-166"></span><span id="size"><span class="annot"><span class="annottext">size :: forall v. IntPSQ v -&gt; Int
</span><a href="GHC.Event.PSQ.html#size"><span class="hs-identifier hs-var hs-var">size</span></a></span></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-167"></span><span class="annot"><a href="GHC.Event.PSQ.html#size"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Prio
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">v
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-168"></span><span class="annot"><a href="GHC.Event.PSQ.html#size"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Prio
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">v
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679551955"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551955"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551954"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551954"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v -&gt; Int
forall v. IntPSQ v -&gt; Int
</span><a href="GHC.Event.PSQ.html#size"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551955"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v -&gt; Int
forall v. IntPSQ v -&gt; Int
</span><a href="GHC.Event.PSQ.html#size"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551954"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-169"></span><span class="hs-comment">-- TODO (SM): benchmark this against a tail-recursive variant</span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span class="hs-comment">-- | /O(min(n,W))/ The priority and value of a given key, or 'Nothing' if the</span><span>
</span><span id="line-172"></span><span class="hs-comment">-- key is not bound.</span><span>
</span><span id="line-173"></span><span id="local-6989586621679552075"><span class="annot"><a href="GHC.Event.PSQ.html#lookup"><span class="hs-identifier hs-type">lookup</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552075"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679552075"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-174"></span><span id="lookup"><span class="annot"><span class="annottext">lookup :: forall v. Key -&gt; IntPSQ v -&gt; Maybe (Prio, v)
</span><a href="GHC.Event.PSQ.html#lookup"><span class="hs-identifier hs-var hs-var">lookup</span></a></span></span><span> </span><span id="local-6989586621679551952"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551952"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntPSQ v -&gt; Maybe (Prio, v)
forall {b}. IntPSQ b -&gt; Maybe (Prio, b)
</span><a href="#local-6989586621679551951"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-176"></span><span>    </span><span id="local-6989586621679551951"><span class="annot"><span class="annottext">go :: IntPSQ b -&gt; Maybe (Prio, b)
</span><a href="#local-6989586621679551951"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679551947"><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551947"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551947"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-177"></span><span>        </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-178"></span><span>
</span><span id="line-179"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551946"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551946"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551945"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551945"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551944"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551944"><span class="hs-identifier hs-var">x'</span></a></span></span><span>
</span><span id="line-180"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551952"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551946"><span class="hs-identifier hs-var">k'</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Prio, b) -&gt; Maybe (Prio, b)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551945"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551944"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551943"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551943"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551942"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551942"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551941"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551941"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679551940"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551940"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551939"><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551939"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551938"><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551938"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-184"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#nomatch"><span class="hs-identifier hs-var">nomatch</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551952"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551943"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551940"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-185"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551952"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551943"><span class="hs-identifier hs-var">k'</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Prio, b) -&gt; Maybe (Prio, b)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551942"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551941"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#zero"><span class="hs-identifier hs-var">zero</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551952"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551940"><span class="hs-identifier hs-var">m</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ b -&gt; Maybe (Prio, b)
</span><a href="#local-6989586621679551951"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551939"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-187"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ b -&gt; Maybe (Prio, b)
</span><a href="#local-6989586621679551951"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551938"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span class="hs-comment">-- | /O(1)/ The element with the lowest priority.</span><span>
</span><span id="line-190"></span><span id="local-6989586621679552071"><span class="annot"><a href="GHC.Event.PSQ.html#findMin"><span class="hs-identifier hs-type">findMin</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552071"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Elem"><span class="hs-identifier hs-type">Elem</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552071"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-191"></span><span id="findMin"><span class="annot"><span class="annottext">findMin :: forall v. IntPSQ v -&gt; Maybe (Elem v)
</span><a href="GHC.Event.PSQ.html#findMin"><span class="hs-identifier hs-var hs-var">findMin</span></a></span></span><span> </span><span id="local-6989586621679551937"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551937"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551937"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-192"></span><span>    </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Elem v)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-193"></span><span>    </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551936"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551936"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551935"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551935"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551934"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551934"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Elem v -&gt; Maybe (Elem v)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Elem v
forall a. Key -&gt; Prio -&gt; a -&gt; Elem a
</span><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551936"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551935"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551934"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>    </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551933"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551933"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551932"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551932"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551931"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551931"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Elem v -&gt; Maybe (Elem v)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Elem v
forall a. Key -&gt; Prio -&gt; a -&gt; Elem a
</span><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551933"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551932"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551931"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-198"></span><span class="hs-comment">--- Construction</span><span>
</span><span id="line-199"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-comment">-- | /O(1)/ The empty queue.</span><span>
</span><span id="line-202"></span><span id="local-6989586621679552069"><span class="annot"><a href="GHC.Event.PSQ.html#empty"><span class="hs-identifier hs-type">empty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552069"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-203"></span><span id="empty"><span class="annot"><span class="annottext">empty :: forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#empty"><span class="hs-identifier hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="hs-comment">-- | /O(1)/ Build a queue with one element.</span><span>
</span><span id="line-206"></span><span id="local-6989586621679552067"><span class="annot"><a href="GHC.Event.PSQ.html#singleton"><span class="hs-identifier hs-type">singleton</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679552067"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552067"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-207"></span><span id="singleton"><span class="annot"><span class="annottext">singleton :: forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#singleton"><span class="hs-identifier hs-var hs-var">singleton</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-var">Tip</span></a></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- Insertion</span><span>
</span><span id="line-212"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="hs-comment">-- | /O(min(n,W))/ Insert a new key that is *not* present in the priority queue.</span><span>
</span><span id="line-215"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-pragma hs-type">unsafeInsertNew</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-216"></span><span id="local-6989586621679552065"><span class="annot"><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-identifier hs-type">unsafeInsertNew</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679552065"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552065"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552065"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-217"></span><span id="unsafeInsertNew"><span class="annot"><span class="annottext">unsafeInsertNew :: forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-identifier hs-var hs-var">unsafeInsertNew</span></a></span></span><span> </span><span id="local-6989586621679551930"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551929"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551928"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntPSQ v -&gt; IntPSQ v
</span><a href="#local-6989586621679551927"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-218"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-219"></span><span>    </span><span id="local-6989586621679551927"><span class="annot"><span class="annottext">go :: IntPSQ v -&gt; IntPSQ v
</span><a href="#local-6989586621679551927"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679551918"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551918"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551918"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-220"></span><span>      </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-var">Tip</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span>      </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551917"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551917"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551916"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551916"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551915"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551915"><span class="hs-identifier hs-var">x'</span></a></span></span><span>
</span><span id="line-223"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Prio, Key) -&gt; (Prio, Key) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551916"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551917"><span class="hs-identifier hs-var">k'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#link"><span class="hs-identifier hs-var">link</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span>  </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span>  </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551917"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551918"><span class="hs-identifier hs-var">t</span></a></span><span>           </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-224"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#link"><span class="hs-identifier hs-var">link</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551917"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551916"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551915"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-var">Tip</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-225"></span><span>
</span><span id="line-226"></span><span>      </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551912"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551911"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551911"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551910"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551910"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679551909"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551908"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551908"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551907"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551907"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-227"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#nomatch"><span class="hs-identifier hs-var">nomatch</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-228"></span><span>            </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Prio, Key) -&gt; (Prio, Key) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551911"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>              </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#link"><span class="hs-identifier hs-var">link</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span>  </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span>  </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551918"><span class="hs-identifier hs-var">t</span></a></span><span>           </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-230"></span><span>              </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#link"><span class="hs-identifier hs-var">link</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551911"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551910"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-var">Tip</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551908"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551907"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-233"></span><span>            </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Prio, Key) -&gt; (Prio, Key) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551911"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-234"></span><span>              </span><span class="hs-keyword">then</span><span>
</span><span id="line-235"></span><span>                </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#zero"><span class="hs-identifier hs-var">zero</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-236"></span><span>                  </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span>  </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span>  </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-identifier hs-var">unsafeInsertNew</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551911"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551910"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551908"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551907"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-237"></span><span>                  </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span>  </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span>  </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551908"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-identifier hs-var">unsafeInsertNew</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551911"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551910"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551907"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-238"></span><span>              </span><span class="hs-keyword">else</span><span>
</span><span id="line-239"></span><span>                </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#zero"><span class="hs-identifier hs-var">zero</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-240"></span><span>                  </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551911"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551910"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-identifier hs-var">unsafeInsertNew</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span>  </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span>  </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551908"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551907"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-241"></span><span>                  </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551912"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551911"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551910"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551909"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551908"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-identifier hs-var">unsafeInsertNew</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551930"><span class="hs-identifier hs-var">k</span></a></span><span>  </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551929"><span class="hs-identifier hs-var">p</span></a></span><span>  </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551928"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551907"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>
</span><span id="line-243"></span><span class="hs-comment">-- | Link</span><span>
</span><span id="line-244"></span><span id="local-6989586621679552060"><span class="annot"><a href="GHC.Event.PSQ.html#link"><span class="hs-identifier hs-type">link</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679552060"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552060"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552060"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552060"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-245"></span><span id="link"><span class="annot"><span class="annottext">link :: forall v.
Key -&gt; Prio -&gt; v -&gt; Key -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#link"><span class="hs-identifier hs-var hs-var">link</span></a></span></span><span> </span><span id="local-6989586621679551905"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551905"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551904"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551904"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551903"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551903"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679551902"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551902"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551901"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551901"><span class="hs-identifier hs-var">k't</span></a></span></span><span> </span><span id="local-6989586621679551900"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551900"><span class="hs-identifier hs-var">otherTree</span></a></span></span><span>
</span><span id="line-246"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#zero"><span class="hs-identifier hs-var">zero</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Key
</span><a href="GHC.Event.Unique.html#Unique"><span class="hs-identifier hs-var">Unique</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551898"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Int
</span><a href="GHC.Event.Unique.html#asInt"><span class="hs-identifier hs-var hs-var">asInt</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551902"><span class="hs-identifier hs-var">k'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551905"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551904"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551903"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551898"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551901"><span class="hs-identifier hs-var">k't</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551900"><span class="hs-identifier hs-var">otherTree</span></a></span><span>
</span><span id="line-247"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551905"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551904"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551903"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551898"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551900"><span class="hs-identifier hs-var">otherTree</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551901"><span class="hs-identifier hs-var">k't</span></a></span><span>
</span><span id="line-248"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-249"></span><span>    </span><span id="local-6989586621679551898"><span class="annot"><span class="annottext">m :: Int
</span><a href="#local-6989586621679551898"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Int
</span><a href="GHC.Event.PSQ.html#branchMask"><span class="hs-identifier hs-var">branchMask</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551905"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551902"><span class="hs-identifier hs-var">k'</span></a></span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- Delete/Alter</span><span>
</span><span id="line-254"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-comment">-- | /O(min(n,W))/ Delete a key and its priority and value from the queue. When</span><span>
</span><span id="line-257"></span><span class="hs-comment">-- the key is not a member of the queue, the original queue is returned.</span><span>
</span><span id="line-258"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#delete"><span class="hs-pragma hs-type">delete</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-259"></span><span id="local-6989586621679552056"><span class="annot"><a href="GHC.Event.PSQ.html#delete"><span class="hs-identifier hs-type">delete</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552056"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552056"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-260"></span><span id="delete"><span class="annot"><span class="annottext">delete :: forall v. Key -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#delete"><span class="hs-identifier hs-var hs-var">delete</span></a></span></span><span> </span><span id="local-6989586621679551897"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551897"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntPSQ v -&gt; IntPSQ v
forall {v}. IntPSQ v -&gt; IntPSQ v
</span><a href="#local-6989586621679551896"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-261"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-262"></span><span>    </span><span id="local-6989586621679551896"><span class="annot"><span class="annottext">go :: IntPSQ v -&gt; IntPSQ v
</span><a href="#local-6989586621679551896"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679551893"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551893"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551893"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-263"></span><span>        </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-264"></span><span>
</span><span id="line-265"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551892"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551892"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Prio
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">v
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-266"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551897"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551892"><span class="hs-identifier hs-var">k'</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-267"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551893"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551891"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551891"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551890"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551890"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551889"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551889"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679551888"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551888"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551887"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551887"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551886"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551886"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-270"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#nomatch"><span class="hs-identifier hs-var">nomatch</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551897"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551891"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551888"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551893"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-271"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551897"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551891"><span class="hs-identifier hs-var">k'</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551888"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551887"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551886"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-272"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#zero"><span class="hs-identifier hs-var">zero</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551897"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551888"><span class="hs-identifier hs-var">m</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#binShrinkL"><span class="hs-identifier hs-var">binShrinkL</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551891"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551890"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551889"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551888"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IntPSQ v -&gt; IntPSQ v
</span><a href="#local-6989586621679551896"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551887"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551886"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-273"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#binShrinkR"><span class="hs-identifier hs-var">binShrinkR</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551891"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551890"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551889"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551888"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551887"><span class="hs-identifier hs-var">l</span></a></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IntPSQ v -&gt; IntPSQ v
</span><a href="#local-6989586621679551896"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551886"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span class="hs-comment">-- | /O(min(n,W))/ Delete the binding with the least priority, and return the</span><span>
</span><span id="line-276"></span><span class="hs-comment">-- rest of the queue stripped of that binding. In case the queue is empty, the</span><span>
</span><span id="line-277"></span><span class="hs-comment">-- empty queue is returned again.</span><span>
</span><span id="line-278"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#deleteMin"><span class="hs-pragma hs-type">deleteMin</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-279"></span><span id="local-6989586621679551883"><span class="annot"><a href="GHC.Event.PSQ.html#deleteMin"><span class="hs-identifier hs-type">deleteMin</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551883"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551883"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-280"></span><span id="deleteMin"><span class="annot"><span class="annottext">deleteMin :: forall {v}. IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#deleteMin"><span class="hs-identifier hs-var hs-var">deleteMin</span></a></span></span><span> </span><span id="local-6989586621679551882"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551882"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v -&gt; Maybe (Elem v, IntPSQ v)
forall v. IntPSQ v -&gt; Maybe (Elem v, IntPSQ v)
</span><a href="GHC.Event.PSQ.html#minView"><span class="hs-identifier hs-var">minView</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551882"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-281"></span><span>    </span><span class="annot"><span class="annottext">Maybe (Elem v, IntPSQ v)
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551882"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-282"></span><span>    </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Elem v
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551881"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551881"><span class="hs-identifier hs-var">t'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551881"><span class="hs-identifier hs-var">t'</span></a></span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span id="local-6989586621679552051"><span class="annot"><a href="GHC.Event.PSQ.html#adjust"><span class="hs-identifier hs-type">adjust</span></a></span><span>
</span><span id="line-286"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span>
</span><span id="line-288"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#PSQ"><span class="hs-identifier hs-type">PSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552051"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-289"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#PSQ"><span class="hs-identifier hs-type">PSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552051"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-290"></span><span id="adjust"><span class="annot"><span class="annottext">adjust :: forall a. (Prio -&gt; Prio) -&gt; Key -&gt; PSQ a -&gt; PSQ a
</span><a href="GHC.Event.PSQ.html#adjust"><span class="hs-identifier hs-var hs-var">adjust</span></a></span></span><span> </span><span id="local-6989586621679551880"><span class="annot"><span class="annottext">Prio -&gt; Prio
</span><a href="#local-6989586621679551880"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679551879"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551879"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551878"><span class="annot"><span class="annottext">PSQ a
</span><a href="#local-6989586621679551878"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Maybe (Prio, a) -&gt; ((), Maybe (Prio, a)))
-&gt; Key -&gt; PSQ a -&gt; ((), PSQ a)
forall v b.
(Maybe (Prio, v) -&gt; (b, Maybe (Prio, v)))
-&gt; Key -&gt; IntPSQ v -&gt; (b, IntPSQ v)
</span><a href="GHC.Event.PSQ.html#alter"><span class="hs-identifier hs-var">alter</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, a) -&gt; ((), Maybe (Prio, a))
forall {b}. Maybe (Prio, b) -&gt; ((), Maybe (Prio, b))
</span><a href="#local-6989586621679551876"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551879"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">PSQ a
</span><a href="#local-6989586621679551878"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551875"><span class="annot"><span class="annottext">PSQ a
</span><a href="#local-6989586621679551875"><span class="hs-identifier hs-var">q'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PSQ a
</span><a href="#local-6989586621679551875"><span class="hs-identifier hs-var">q'</span></a></span><span>
</span><span id="line-291"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679551876"><span class="annot"><span class="annottext">g :: Maybe (Prio, b) -&gt; ((), Maybe (Prio, b))
</span><a href="#local-6989586621679551876"><span class="hs-identifier hs-var hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679551874"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551874"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551873"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551873"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Prio, b) -&gt; Maybe (Prio, b)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio -&gt; Prio
</span><a href="#local-6989586621679551880"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551874"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551873"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span>        </span><span class="annot"><a href="#local-6989586621679551876"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-293"></span><span>
</span><span id="line-294"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#adjust"><span class="hs-pragma hs-type">adjust</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span class="hs-comment">-- | /O(min(n,W))/ The expression @alter f k queue@ alters the value @x@ at @k@,</span><span>
</span><span id="line-297"></span><span class="hs-comment">-- or absence thereof. 'alter' can be used to insert, delete, or update a value</span><span>
</span><span id="line-298"></span><span class="hs-comment">-- in a queue. It also allows you to calculate an additional value @b@.</span><span>
</span><span id="line-299"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#alter"><span class="hs-pragma hs-type">alter</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-300"></span><span id="local-6989586621679552047"><span id="local-6989586621679552048"><span class="annot"><a href="GHC.Event.PSQ.html#alter"><span class="hs-identifier hs-type">alter</span></a></span><span>
</span><span id="line-301"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679552048"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679552047"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679552048"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-302"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span>
</span><span id="line-303"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552048"><span class="hs-identifier hs-type">v</span></a></span><span>
</span><span id="line-304"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679552047"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552048"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-305"></span><span id="alter"><span class="annot"><span class="annottext">alter :: forall v b.
(Maybe (Prio, v) -&gt; (b, Maybe (Prio, v)))
-&gt; Key -&gt; IntPSQ v -&gt; (b, IntPSQ v)
</span><a href="GHC.Event.PSQ.html#alter"><span class="hs-identifier hs-var hs-var">alter</span></a></span></span><span> </span><span id="local-6989586621679551872"><span class="annot"><span class="annottext">Maybe (Prio, v) -&gt; (b, Maybe (Prio, v))
</span><a href="#local-6989586621679551872"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679551871"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551871"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551870"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551870"><span class="hs-identifier hs-var">t0</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-306"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679551869"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551869"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551868"><span class="annot"><span class="annottext">Maybe (Prio, v)
</span><a href="#local-6989586621679551868"><span class="hs-identifier hs-var">mbX</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Key -&gt; IntPSQ v -&gt; Maybe (Prio, v, IntPSQ v)
forall v. Key -&gt; IntPSQ v -&gt; Maybe (Prio, v, IntPSQ v)
</span><a href="GHC.Event.PSQ.html#deleteView"><span class="hs-identifier hs-var">deleteView</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551871"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551870"><span class="hs-identifier hs-var">t0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-307"></span><span>                            </span><span class="annot"><span class="annottext">Maybe (Prio, v, IntPSQ v)
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551870"><span class="hs-identifier hs-var">t0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, v)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span>                            </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679551866"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551866"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551865"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551865"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551864"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551864"><span class="hs-identifier hs-var">t0'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551864"><span class="hs-identifier hs-var">t0'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Prio, v) -&gt; Maybe (Prio, v)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551866"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551865"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-309"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, v) -&gt; (b, Maybe (Prio, v))
</span><a href="#local-6989586621679551872"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, v)
</span><a href="#local-6989586621679551868"><span class="hs-identifier hs-var">mbX</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-310"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679551863"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551863"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551862"><span class="annot"><span class="annottext">Maybe (Prio, v)
</span><a href="#local-6989586621679551862"><span class="hs-identifier hs-var">mbX'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-311"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551863"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IntPSQ v -&gt; ((Prio, v) -&gt; IntPSQ v) -&gt; Maybe (Prio, v) -&gt; IntPSQ v
forall {t} {t}. t -&gt; (t -&gt; t) -&gt; Maybe t -&gt; t
</span><a href="#local-6989586621679551861"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551869"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679551860"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551860"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551859"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551859"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#unsafeInsertNew"><span class="hs-identifier hs-var">unsafeInsertNew</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551871"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551860"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551859"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551869"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, v)
</span><a href="#local-6989586621679551862"><span class="hs-identifier hs-var">mbX'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-313"></span><span>        </span><span id="local-6989586621679551861"><span class="annot"><span class="annottext">maybe :: t -&gt; (t -&gt; t) -&gt; Maybe t -&gt; t
</span><a href="#local-6989586621679551861"><span class="hs-identifier hs-var hs-var">maybe</span></a></span></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679551858"><span class="annot"><span class="annottext">t -&gt; t
</span><a href="#local-6989586621679551858"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679551857"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679551857"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t -&gt; t
</span><a href="#local-6989586621679551858"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679551857"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-314"></span><span>        </span><span class="annot"><a href="#local-6989586621679551861"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span id="local-6989586621679551856"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679551856"><span class="hs-identifier hs-var">def</span></a></span></span><span> </span><span class="annot"><span class="annottext">t -&gt; t
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe t
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679551856"><span class="hs-identifier hs-var">def</span></a></span><span>
</span><span id="line-315"></span><span>
</span><span id="line-316"></span><span class="hs-comment">-- | Smart constructor for a 'Bin' node whose left subtree could have become</span><span>
</span><span id="line-317"></span><span class="hs-comment">-- 'Nil'.</span><span>
</span><span id="line-318"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#binShrinkL"><span class="hs-pragma hs-type">binShrinkL</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-319"></span><span id="local-6989586621679551855"><span class="annot"><a href="GHC.Event.PSQ.html#binShrinkL"><span class="hs-identifier hs-type">binShrinkL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679551855"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Mask"><span class="hs-identifier hs-type">Mask</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551855"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551855"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551855"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-320"></span><span id="binShrinkL"><span class="annot"><span class="annottext">binShrinkL :: forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#binShrinkL"><span class="hs-identifier hs-var hs-var">binShrinkL</span></a></span></span><span> </span><span id="local-6989586621679551854"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551854"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551853"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551853"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551852"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551852"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679551851"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551851"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span id="local-6989586621679551850"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551850"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551850"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-var">Tip</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551854"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551853"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551852"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551854"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551853"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551852"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551851"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551850"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-321"></span><span class="annot"><a href="GHC.Event.PSQ.html#binShrinkL"><span class="hs-identifier hs-var">binShrinkL</span></a></span><span> </span><span id="local-6989586621679551849"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551849"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551848"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551848"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551847"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551847"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679551846"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551846"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551845"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551845"><span class="hs-identifier hs-var">l</span></a></span></span><span>   </span><span id="local-6989586621679551844"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551844"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551849"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551848"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551847"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551846"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551845"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551844"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-322"></span><span>
</span><span id="line-323"></span><span class="hs-comment">-- | Smart constructor for a 'Bin' node whose right subtree could have become</span><span>
</span><span id="line-324"></span><span class="hs-comment">-- 'Nil'.</span><span>
</span><span id="line-325"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#binShrinkR"><span class="hs-pragma hs-type">binShrinkR</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-326"></span><span id="local-6989586621679551843"><span class="annot"><a href="GHC.Event.PSQ.html#binShrinkR"><span class="hs-identifier hs-type">binShrinkR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679551843"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Mask"><span class="hs-identifier hs-type">Mask</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551843"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551843"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551843"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-327"></span><span id="binShrinkR"><span class="annot"><span class="annottext">binShrinkR :: forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#binShrinkR"><span class="hs-identifier hs-var hs-var">binShrinkR</span></a></span></span><span> </span><span id="local-6989586621679551842"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551842"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551841"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551841"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551840"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551840"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679551839"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551839"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551838"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551838"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551838"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; IntPSQ v
forall v. Key -&gt; Prio -&gt; v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-var">Tip</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551842"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551841"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551840"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551842"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551841"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551840"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551839"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551838"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-328"></span><span class="annot"><a href="GHC.Event.PSQ.html#binShrinkR"><span class="hs-identifier hs-var">binShrinkR</span></a></span><span> </span><span id="local-6989586621679551837"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551837"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551836"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551836"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551835"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551835"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679551834"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551834"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551833"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551833"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551832"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551832"><span class="hs-identifier hs-var">r</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551837"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551836"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551835"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551834"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551833"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551832"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-331"></span><span class="hs-comment">-- Lists</span><span>
</span><span id="line-332"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-333"></span><span>
</span><span id="line-334"></span><span class="hs-comment">-- | /O(n)/ Convert a queue to a list of (key, priority, value) tuples. The</span><span>
</span><span id="line-335"></span><span class="hs-comment">-- order of the list is not specified.</span><span>
</span><span id="line-336"></span><span id="local-6989586621679552038"><span class="annot"><a href="GHC.Event.PSQ.html#toList"><span class="hs-identifier hs-type">toList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552038"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Event.PSQ.html#Elem"><span class="hs-identifier hs-type">Elem</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552038"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-337"></span><span id="toList"><span class="annot"><span class="annottext">toList :: forall v. IntPSQ v -&gt; [Elem v]
</span><a href="GHC.Event.PSQ.html#toList"><span class="hs-identifier hs-var hs-var">toList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-338"></span><span>    </span><span class="annot"><span class="annottext">[Elem v] -&gt; IntPSQ v -&gt; [Elem v]
forall {a}. [Elem a] -&gt; IntPSQ a -&gt; [Elem a]
</span><a href="#local-6989586621679551831"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-339"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-340"></span><span>    </span><span id="local-6989586621679551831"><span class="annot"><span class="annottext">go :: [Elem a] -&gt; IntPSQ a -&gt; [Elem a]
</span><a href="#local-6989586621679551831"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679551830"><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551830"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551830"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-341"></span><span>    </span><span class="annot"><a href="#local-6989586621679551831"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679551829"><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551829"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551828"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551828"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551827"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551827"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551826"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551826"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; a -&gt; Elem a
forall a. Key -&gt; Prio -&gt; a -&gt; Elem a
</span><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551828"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551827"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551826"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Elem a -&gt; [Elem a] -&gt; [Elem a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551829"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-342"></span><span>    </span><span class="annot"><a href="#local-6989586621679551831"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679551825"><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551825"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551824"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551824"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551823"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551823"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551822"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551822"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679551821"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551821"><span class="hs-identifier hs-var">_m</span></a></span></span><span> </span><span id="local-6989586621679551820"><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551820"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551819"><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551819"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; a -&gt; Elem a
forall a. Key -&gt; Prio -&gt; a -&gt; Elem a
</span><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551824"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551823"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551822"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Elem a -&gt; [Elem a] -&gt; [Elem a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Elem a] -&gt; IntPSQ a -&gt; [Elem a]
</span><a href="#local-6989586621679551831"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Elem a] -&gt; IntPSQ a -&gt; [Elem a]
</span><a href="#local-6989586621679551831"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551825"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551819"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551820"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-346"></span><span class="hs-comment">-- Views</span><span>
</span><span id="line-347"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span class="hs-comment">-- | /O(min(n,W))/ Delete a key and its priority and value from the queue. If</span><span>
</span><span id="line-350"></span><span class="hs-comment">-- the key was present, the associated priority and value are returned in</span><span>
</span><span id="line-351"></span><span class="hs-comment">-- addition to the updated queue.</span><span>
</span><span id="line-352"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#deleteView"><span class="hs-pragma hs-type">deleteView</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-353"></span><span id="local-6989586621679552043"><span class="annot"><a href="GHC.Event.PSQ.html#deleteView"><span class="hs-identifier hs-type">deleteView</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552043"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679552043"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552043"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-354"></span><span id="deleteView"><span class="annot"><span class="annottext">deleteView :: forall v. Key -&gt; IntPSQ v -&gt; Maybe (Prio, v, IntPSQ v)
</span><a href="GHC.Event.PSQ.html#deleteView"><span class="hs-identifier hs-var hs-var">deleteView</span></a></span></span><span> </span><span id="local-6989586621679551818"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551818"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551817"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551817"><span class="hs-identifier hs-var">t0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-355"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v -&gt; (# IntPSQ v, Maybe (Prio, v) #)
forall {b}. IntPSQ b -&gt; (# IntPSQ b, Maybe (Prio, b) #)
</span><a href="#local-6989586621679551816"><span class="hs-identifier hs-var">delFrom</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551817"><span class="hs-identifier hs-var">t0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-356"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, v)
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>     </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, v, IntPSQ v)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-357"></span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679551815"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551815"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679551814"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551814"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551813"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551813"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Prio, v, IntPSQ v) -&gt; Maybe (Prio, v, IntPSQ v)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551814"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551813"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551815"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-358"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-359"></span><span>    </span><span id="local-6989586621679551816"><span class="annot"><span class="annottext">delFrom :: IntPSQ b -&gt; (# IntPSQ b, Maybe (Prio, b) #)
</span><a href="#local-6989586621679551816"><span class="hs-identifier hs-var hs-var">delFrom</span></a></span></span><span> </span><span id="local-6989586621679551810"><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551810"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551810"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-360"></span><span>      </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span>      </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551809"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551809"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551808"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551808"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551807"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551807"><span class="hs-identifier hs-var">x'</span></a></span></span><span>
</span><span id="line-363"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551818"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551809"><span class="hs-identifier hs-var">k'</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Prio, b) -&gt; Maybe (Prio, b)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551808"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551807"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-364"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551810"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">Maybe (Prio, b)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>       </span><span class="hs-special">#)</span><span>
</span><span id="line-365"></span><span>
</span><span id="line-366"></span><span>      </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551806"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551806"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span id="local-6989586621679551805"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551805"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span id="local-6989586621679551804"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551804"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679551803"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551803"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551802"><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551802"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551801"><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551801"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-367"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#nomatch"><span class="hs-identifier hs-var">nomatch</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551818"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551806"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551803"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551810"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-368"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551818"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551806"><span class="hs-identifier hs-var">k'</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679551800"><span class="annot"><span class="annottext">t' :: IntPSQ b
</span><a href="#local-6989586621679551800"><span class="hs-identifier hs-var hs-var">t'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IntPSQ b -&gt; IntPSQ b -&gt; IntPSQ b
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551803"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551802"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551801"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-369"></span><span>                       </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551800"><span class="hs-identifier hs-var">t'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
-&gt; (# IntPSQ b, Maybe (Prio, b) #)
-&gt; (# IntPSQ b, Maybe (Prio, b) #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551800"><span class="hs-identifier hs-var">t'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Prio, b) -&gt; Maybe (Prio, b)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551805"><span class="hs-identifier hs-var">p'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551804"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-370"></span><span>
</span><span id="line-371"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Int -&gt; Bool
</span><a href="GHC.Event.PSQ.html#zero"><span class="hs-identifier hs-var">zero</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551818"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551803"><span class="hs-identifier hs-var">m</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ b -&gt; (# IntPSQ b, Maybe (Prio, b) #)
</span><a href="#local-6989586621679551816"><span class="hs-identifier hs-var">delFrom</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551802"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-372"></span><span>                         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679551799"><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551799"><span class="hs-identifier hs-var">l'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551798"><span class="annot"><span class="annottext">Maybe (Prio, b)
</span><a href="#local-6989586621679551798"><span class="hs-identifier hs-var">mbPX</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679551797"><span class="annot"><span class="annottext">t' :: IntPSQ b
</span><a href="#local-6989586621679551797"><span class="hs-identifier hs-var hs-var">t'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; b -&gt; Int -&gt; IntPSQ b -&gt; IntPSQ b -&gt; IntPSQ b
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#binShrinkL"><span class="hs-identifier hs-var">binShrinkL</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551806"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551805"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551804"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551803"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551799"><span class="hs-identifier hs-var">l'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551801"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-373"></span><span>                                           </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551797"><span class="hs-identifier hs-var">t'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
-&gt; (# IntPSQ b, Maybe (Prio, b) #)
-&gt; (# IntPSQ b, Maybe (Prio, b) #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551797"><span class="hs-identifier hs-var">t'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
</span><a href="#local-6989586621679551798"><span class="hs-identifier hs-var">mbPX</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ b -&gt; (# IntPSQ b, Maybe (Prio, b) #)
</span><a href="#local-6989586621679551816"><span class="hs-identifier hs-var">delFrom</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551801"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-376"></span><span>                         </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679551796"><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551796"><span class="hs-identifier hs-var">r'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551795"><span class="annot"><span class="annottext">Maybe (Prio, b)
</span><a href="#local-6989586621679551795"><span class="hs-identifier hs-var">mbPX</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679551794"><span class="annot"><span class="annottext">t' :: IntPSQ b
</span><a href="#local-6989586621679551794"><span class="hs-identifier hs-var hs-var">t'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; b -&gt; Int -&gt; IntPSQ b -&gt; IntPSQ b -&gt; IntPSQ b
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#binShrinkR"><span class="hs-identifier hs-var">binShrinkR</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551806"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551805"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679551804"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551803"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551802"><span class="hs-identifier hs-var">l</span></a></span><span>  </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551796"><span class="hs-identifier hs-var">r'</span></a></span><span>
</span><span id="line-377"></span><span>                                           </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551794"><span class="hs-identifier hs-var">t'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ b
-&gt; (# IntPSQ b, Maybe (Prio, b) #)
-&gt; (# IntPSQ b, Maybe (Prio, b) #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">IntPSQ b
</span><a href="#local-6989586621679551794"><span class="hs-identifier hs-var">t'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Prio, b)
</span><a href="#local-6989586621679551795"><span class="hs-identifier hs-var">mbPX</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-378"></span><span>
</span><span id="line-379"></span><span class="hs-comment">-- | /O(min(n,W))/ Retrieve the binding with the least priority, and the</span><span>
</span><span id="line-380"></span><span class="hs-comment">-- rest of the queue stripped of that binding.</span><span>
</span><span id="line-381"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#minView"><span class="hs-pragma hs-type">minView</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-382"></span><span id="local-6989586621679552052"><span class="annot"><a href="GHC.Event.PSQ.html#minView"><span class="hs-identifier hs-type">minView</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552052"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.PSQ.html#Elem"><span class="hs-identifier hs-type">Elem</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552052"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552052"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-383"></span><span id="minView"><span class="annot"><span class="annottext">minView :: forall v. IntPSQ v -&gt; Maybe (Elem v, IntPSQ v)
</span><a href="GHC.Event.PSQ.html#minView"><span class="hs-identifier hs-var hs-var">minView</span></a></span></span><span> </span><span id="local-6989586621679551793"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551793"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551793"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-384"></span><span>    </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Elem v, IntPSQ v)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-385"></span><span>    </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551792"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551792"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551791"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551791"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551790"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551790"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Elem v, IntPSQ v) -&gt; Maybe (Elem v, IntPSQ v)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Elem v
forall a. Key -&gt; Prio -&gt; a -&gt; Elem a
</span><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551792"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551791"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551790"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-386"></span><span>    </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551789"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551789"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551788"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551788"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551787"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551787"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679551786"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551786"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551785"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551785"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551784"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551784"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Elem v, IntPSQ v) -&gt; Maybe (Elem v, IntPSQ v)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Elem v
forall a. Key -&gt; Prio -&gt; a -&gt; Elem a
</span><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551789"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551788"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551787"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551786"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551785"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551784"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="hs-comment">-- | Return a list of elements ordered by key whose priorities are at most @pt@,</span><span>
</span><span id="line-389"></span><span class="hs-comment">-- and the rest of the queue stripped of these elements.  The returned list of</span><span>
</span><span id="line-390"></span><span class="hs-comment">-- elements can be in any order: no guarantees there.</span><span>
</span><span id="line-391"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#atMost"><span class="hs-pragma hs-type">atMost</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-392"></span><span id="local-6989586621679552030"><span class="annot"><a href="GHC.Event.PSQ.html#atMost"><span class="hs-identifier hs-type">atMost</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Prio"><span class="hs-identifier hs-type">Prio</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552030"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Event.PSQ.html#Elem"><span class="hs-identifier hs-type">Elem</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552030"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552030"><span class="hs-identifier hs-type">v</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-393"></span><span id="atMost"><span class="annot"><span class="annottext">atMost :: forall v. Prio -&gt; IntPSQ v -&gt; ([Elem v], IntPSQ v)
</span><a href="GHC.Event.PSQ.html#atMost"><span class="hs-identifier hs-var hs-var">atMost</span></a></span></span><span> </span><span id="local-6989586621679551783"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551783"><span class="hs-identifier hs-var">pt</span></a></span></span><span> </span><span id="local-6989586621679551782"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551782"><span class="hs-identifier hs-var">t0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Elem v] -&gt; IntPSQ v -&gt; ([Elem v], IntPSQ v)
forall {a}. [Elem a] -&gt; IntPSQ a -&gt; ([Elem a], IntPSQ a)
</span><a href="#local-6989586621679551781"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551782"><span class="hs-identifier hs-var">t0</span></a></span><span>
</span><span id="line-394"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-395"></span><span>    </span><span id="local-6989586621679551781"><span class="annot"><span class="annottext">go :: [Elem a] -&gt; IntPSQ a -&gt; ([Elem a], IntPSQ a)
</span><a href="#local-6989586621679551781"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679551778"><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551778"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span id="local-6989586621679551777"><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551777"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551777"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-396"></span><span>        </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551778"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551777"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-397"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551776"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551776"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551775"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551775"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551774"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551774"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-398"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551775"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Prio -&gt; Prio -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551783"><span class="hs-identifier hs-var">pt</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551778"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551777"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-399"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; a -&gt; Elem a
forall a. Key -&gt; Prio -&gt; a -&gt; Elem a
</span><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551776"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551775"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551774"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Elem a -&gt; [Elem a] -&gt; [Elem a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551778"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IntPSQ a
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-400"></span><span>
</span><span id="line-401"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551772"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551772"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679551771"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551771"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679551770"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551770"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679551769"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551769"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551768"><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551768"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551767"><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551767"><span class="hs-identifier hs-var">r</span></a></span></span><span>
</span><span id="line-402"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551771"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Prio -&gt; Prio -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551783"><span class="hs-identifier hs-var">pt</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551778"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551777"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-403"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-404"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679551766"><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551766"><span class="hs-identifier hs-var">acc'</span></a></span></span><span class="hs-special">,</span><span>  </span><span id="local-6989586621679551765"><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551765"><span class="hs-identifier hs-var">l'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Elem a] -&gt; IntPSQ a -&gt; ([Elem a], IntPSQ a)
</span><a href="#local-6989586621679551781"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551778"><span class="hs-identifier hs-var">acc</span></a></span><span>  </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551768"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-405"></span><span>                    </span><span class="hs-special">(</span><span id="local-6989586621679551764"><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551764"><span class="hs-identifier hs-var">acc''</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551763"><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551763"><span class="hs-identifier hs-var">r'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Elem a] -&gt; IntPSQ a -&gt; ([Elem a], IntPSQ a)
</span><a href="#local-6989586621679551781"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551766"><span class="hs-identifier hs-var">acc'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551767"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-406"></span><span>                </span><span class="hs-keyword">in</span><span>  </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; a -&gt; Elem a
forall a. Key -&gt; Prio -&gt; a -&gt; Elem a
</span><a href="GHC.Event.PSQ.html#E"><span class="hs-identifier hs-var">E</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551772"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551771"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551770"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Elem a -&gt; [Elem a] -&gt; [Elem a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Elem a]
</span><a href="#local-6989586621679551764"><span class="hs-identifier hs-var">acc''</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IntPSQ a -&gt; IntPSQ a -&gt; IntPSQ a
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551769"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551765"><span class="hs-identifier hs-var">l'</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ a
</span><a href="#local-6989586621679551763"><span class="hs-identifier hs-var">r'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span>
</span><span id="line-408"></span><span>
</span><span id="line-409"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-410"></span><span class="hs-comment">-- Traversal</span><span>
</span><span id="line-411"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-412"></span><span>
</span><span id="line-413"></span><span class="hs-comment">-- | Internal function that merges two *disjoint* 'IntPSQ's that share the</span><span>
</span><span id="line-414"></span><span class="hs-comment">-- same prefix mask.</span><span>
</span><span id="line-415"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#merge"><span class="hs-pragma hs-type">merge</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-416"></span><span id="local-6989586621679552059"><span class="annot"><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-type">merge</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#Mask"><span class="hs-identifier hs-type">Mask</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552059"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552059"><span class="hs-identifier hs-type">v</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Event.PSQ.html#IntPSQ"><span class="hs-identifier hs-type">IntPSQ</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679552059"><span class="hs-identifier hs-type">v</span></a></span></span><span>
</span><span id="line-417"></span><span id="merge"><span class="annot"><span class="annottext">merge :: forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var hs-var">merge</span></a></span></span><span> </span><span id="local-6989586621679551756"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551755"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551755"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679551754"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551754"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551755"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-418"></span><span>    </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551754"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-419"></span><span>
</span><span id="line-420"></span><span>    </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551753"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551753"><span class="hs-identifier hs-var">lk</span></a></span></span><span> </span><span id="local-6989586621679551752"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551752"><span class="hs-identifier hs-var">lp</span></a></span></span><span> </span><span id="local-6989586621679551751"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551751"><span class="hs-identifier hs-var">lx</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-421"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551754"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-422"></span><span>        </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551755"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-423"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551750"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551750"><span class="hs-identifier hs-var">rk</span></a></span></span><span> </span><span id="local-6989586621679551749"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551749"><span class="hs-identifier hs-var">rp</span></a></span></span><span> </span><span id="local-6989586621679551748"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551748"><span class="hs-identifier hs-var">rx</span></a></span></span><span>
</span><span id="line-424"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551752"><span class="hs-identifier hs-var">lp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551753"><span class="hs-identifier hs-var">lk</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Prio, Key) -&gt; (Prio, Key) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551749"><span class="hs-identifier hs-var">rp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551750"><span class="hs-identifier hs-var">rk</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551753"><span class="hs-identifier hs-var">lk</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551752"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551751"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551754"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-425"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551750"><span class="hs-identifier hs-var">rk</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551749"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551748"><span class="hs-identifier hs-var">rx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551755"><span class="hs-identifier hs-var">l</span></a></span><span>   </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-426"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551747"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551747"><span class="hs-identifier hs-var">rk</span></a></span></span><span> </span><span id="local-6989586621679551746"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551746"><span class="hs-identifier hs-var">rp</span></a></span></span><span> </span><span id="local-6989586621679551745"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551745"><span class="hs-identifier hs-var">rx</span></a></span></span><span> </span><span id="local-6989586621679551744"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551744"><span class="hs-identifier hs-var">rm</span></a></span></span><span> </span><span id="local-6989586621679551743"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551743"><span class="hs-identifier hs-var">rl</span></a></span></span><span> </span><span id="local-6989586621679551742"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551742"><span class="hs-identifier hs-var">rr</span></a></span></span><span>
</span><span id="line-427"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551752"><span class="hs-identifier hs-var">lp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551753"><span class="hs-identifier hs-var">lk</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Prio, Key) -&gt; (Prio, Key) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551746"><span class="hs-identifier hs-var">rp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551747"><span class="hs-identifier hs-var">rk</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551753"><span class="hs-identifier hs-var">lk</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551752"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551751"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551754"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-428"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551747"><span class="hs-identifier hs-var">rk</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551746"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551745"><span class="hs-identifier hs-var">rx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551755"><span class="hs-identifier hs-var">l</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551744"><span class="hs-identifier hs-var">rm</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551743"><span class="hs-identifier hs-var">rl</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551742"><span class="hs-identifier hs-var">rr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span>    </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551741"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551741"><span class="hs-identifier hs-var">lk</span></a></span></span><span> </span><span id="local-6989586621679551740"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551740"><span class="hs-identifier hs-var">lp</span></a></span></span><span> </span><span id="local-6989586621679551739"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551739"><span class="hs-identifier hs-var">lx</span></a></span></span><span> </span><span id="local-6989586621679551738"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551738"><span class="hs-identifier hs-var">lm</span></a></span></span><span> </span><span id="local-6989586621679551737"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551737"><span class="hs-identifier hs-var">ll</span></a></span></span><span> </span><span id="local-6989586621679551736"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551736"><span class="hs-identifier hs-var">lr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-431"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551754"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-432"></span><span>        </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551755"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-433"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Tip"><span class="hs-identifier hs-type">Tip</span></a></span><span> </span><span id="local-6989586621679551735"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551735"><span class="hs-identifier hs-var">rk</span></a></span></span><span> </span><span id="local-6989586621679551734"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551734"><span class="hs-identifier hs-var">rp</span></a></span></span><span> </span><span id="local-6989586621679551733"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551733"><span class="hs-identifier hs-var">rx</span></a></span></span><span>
</span><span id="line-434"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551740"><span class="hs-identifier hs-var">lp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551741"><span class="hs-identifier hs-var">lk</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Prio, Key) -&gt; (Prio, Key) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551734"><span class="hs-identifier hs-var">rp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551735"><span class="hs-identifier hs-var">rk</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551741"><span class="hs-identifier hs-var">lk</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551740"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551739"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551738"><span class="hs-identifier hs-var">lm</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551737"><span class="hs-identifier hs-var">ll</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551736"><span class="hs-identifier hs-var">lr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551754"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-435"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551735"><span class="hs-identifier hs-var">rk</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551734"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551733"><span class="hs-identifier hs-var">rx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551755"><span class="hs-identifier hs-var">l</span></a></span><span>                </span><span class="annot"><span class="annottext">IntPSQ v
forall v. IntPSQ v
</span><a href="GHC.Event.PSQ.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-436"></span><span>        </span><span class="annot"><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-type">Bin</span></a></span><span> </span><span id="local-6989586621679551732"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551732"><span class="hs-identifier hs-var">rk</span></a></span></span><span> </span><span id="local-6989586621679551731"><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551731"><span class="hs-identifier hs-var">rp</span></a></span></span><span> </span><span id="local-6989586621679551730"><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551730"><span class="hs-identifier hs-var">rx</span></a></span></span><span> </span><span id="local-6989586621679551729"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551729"><span class="hs-identifier hs-var">rm</span></a></span></span><span> </span><span id="local-6989586621679551728"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551728"><span class="hs-identifier hs-var">rl</span></a></span></span><span> </span><span id="local-6989586621679551727"><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551727"><span class="hs-identifier hs-var">rr</span></a></span></span><span>
</span><span id="line-437"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551740"><span class="hs-identifier hs-var">lp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551741"><span class="hs-identifier hs-var">lk</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Prio, Key) -&gt; (Prio, Key) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551731"><span class="hs-identifier hs-var">rp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551732"><span class="hs-identifier hs-var">rk</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551741"><span class="hs-identifier hs-var">lk</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551740"><span class="hs-identifier hs-var">lp</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551739"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551738"><span class="hs-identifier hs-var">lm</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551737"><span class="hs-identifier hs-var">ll</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551736"><span class="hs-identifier hs-var">lr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551754"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-438"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v.
Key -&gt; Prio -&gt; v -&gt; Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#Bin"><span class="hs-identifier hs-var">Bin</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679551732"><span class="hs-identifier hs-var">rk</span></a></span><span> </span><span class="annot"><span class="annottext">Prio
</span><a href="#local-6989586621679551731"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">v
</span><a href="#local-6989586621679551730"><span class="hs-identifier hs-var">rx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551756"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551755"><span class="hs-identifier hs-var">l</span></a></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
forall v. Int -&gt; IntPSQ v -&gt; IntPSQ v -&gt; IntPSQ v
</span><a href="GHC.Event.PSQ.html#merge"><span class="hs-identifier hs-var">merge</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679551729"><span class="hs-identifier hs-var">rm</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551728"><span class="hs-identifier hs-var">rl</span></a></span><span> </span><span class="annot"><span class="annottext">IntPSQ v
</span><a href="#local-6989586621679551727"><span class="hs-identifier hs-var">rr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-439"></span></pre></body></html>